import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
testCase = "DBshop008—销售管理支付记录"
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox) #调用函数登录dbshop的后台
DBshopEnterMenu2(firefox,'销售管理','支付记录')
rootPath=get_pro_rootpath() #获取项目的绝对路径
filePath=rootPath+r'\public\order1.txt' #拼接文件路径
orderNo=readFile(filePath) #读取文件中的订单编号
firefox.find_element_by_xpath('//a[text()="%s"]'%orderNo).click()
#断言
try:
    if firefox.find_element_by_xpath('//div[text()="发货时间"]').is_displayed():
        writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
firefox.quit()
